//
//  BSSPRHomePageCollectionViewCell.m
//  BrightSunnySky
//
//  Created by 传铎 on 2019/4/17.
//  Copyright © 2019年 PURANG. All rights reserved.
//

#import "BSSPRHomePageCollectionViewCell.h"

@implementation BSSPRHomePageCollectionViewCell
- (id)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self creatUI];
    }
    return self;
}

- (void)creatUI{
    _mainImageView = [[UIImageView alloc]init];
    [self.contentView addSubview:_mainImageView];
    
    [_mainImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(12);
        make.centerX.mas_equalTo(0);
        make.width.mas_equalTo(60);
        make.height.mas_equalTo(60);
    }];
    _mainImageView.layer.masksToBounds = YES;
//    _mainImageView.backgroundColor = [UIColor redColor];
    _mainImageView.layer.cornerRadius = 2;
    _mainImageView.contentMode = UIViewContentModeScaleAspectFill;
    _titileLabel = [[UILabel alloc]init];
    _titileLabel.textColor = colorCode(@"333333");
    _titileLabel.font = fontCount(14);
    _titileLabel.text = @"21313";
    _titileLabel.textAlignment = NSTextAlignmentCenter;
    [self.contentView addSubview:_titileLabel];
    [_titileLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(_mainImageView.mas_bottom).offset(5);
        make.width.mas_equalTo(self.width);
        make.centerX.mas_equalTo(_mainImageView.mas_centerX);
    }];
//    _addressLabel  = [[UILabel alloc]initWithFrame:CGRectMake(15, _titileLabel.bottom + 8, 115 * SCREEN_WIDTH/375*0.85, 15)];
//    _addressLabel.text = @"213";
//    _addressLabel.textAlignment = NSTextAlignmentCenter;
//    _addressLabel.font = fontCount(13);
//    _addressLabel.textColor = colorCode(@"888888");
//    [self.contentView addSubview:_addressLabel];
    
    
    
}
@end
